<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1 {
            width: 300px;
            height: 300px;
            background-color: pink;
        }
        .div2 {
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        .div3 {
            width: 100px;
            height: 100px;
            background-color: burlywood;
        }
    </style>
</head>
<body>
    <p>事件触发时，所经历的三个阶段：捕获阶段  、 处于目标对象阶段、 冒泡阶段</p>
    <div class="div1">
        <div class="div2">
            <div class="div3"></div>
        </div>
    </div>

    <script>
        var div1 = document.querySelector('.div1')
        var div2 = document.querySelector('.div2')
        var div3 = document.querySelector('.div3')

        div1.addEventListener('click', function() {
            console.log('div1');
        }, true)
        div2.addEventListener('click', function() {
            console.log('div2');
        }, true)
        div3.addEventListener('click', function() {
            console.log('div3');
        }, true)
        div3.addEventListener('click', function() {
            console.log('div3333');
        }, true)
    </script>
</body>
</html>